{
  "properties" : { },
  "id" : "f9ef5687d3a74b7da96c7619df87c1ff",
  "script" : null,
  "groupId" : "6ecba9cf8cce4bd0bb9cced584f044f5",
  "name" : "添加",
  "createTime" : 1718810324570,
  "updateTime" : 1711808271808,
  "lock" : null,
  "createBy" : "管理员",
  "updateBy" : "管理员",
  "path" : "add",
  "method" : "POST",
  "parameters" : [ ],
  "options" : [ ],
  "requestBody" : "{\"id\":6,\"key\":\"t1z\",\"desc\":\"1234\",\"type\":1,\"children\":[]}",
  "headers" : [ ],
  "paths" : [ ],
  "responseBody" : null,
  "description" : null,
  "requestBodyDefinition" : null,
  "responseBodyDefinition" : null
}
================================
import 'com.wiwf.model.mapper.admin.dao.SysDictMapper' as sysDictMapper;

if(body.id != null){
    return sysDictMapper.update(body);
}

try {
    return sysDictMapper.save(body);
} catch(e) {
    exit 500, '添加失败';
}